<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" style="height:100%">
<head>
  <meta charset="utf-8"/>
  <title></title>
  <meta name="renderer" content="webkit"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
  <link rel="stylesheet" href="/res/layui/css/layui.css" media="all"/>
  <link rel="stylesheet" href="/res/js/common/Viewer/viewer.min.css" />
  <link rel="stylesheet" href="/res/zTree_v3/css/metroStyle/metroStyle.css" type="text/css"/>
  <link rel="stylesheet" href="/res/css/style.css" media="all"> 
	<style type="text/css">
	ul.ztree {
		margin-top: 10px;
		border: 1px solid #617775;
		background: #f0f6e4;
		width: 220px;
		height: 360px;
		overflow-y: scroll;
		overflow-x: auto;
	}
	</style>
</head>
	<body style="height:100%">
		<div class="layui-fluid" style="padding-top:10px;">
		<span class="layui-breadcrumb">
		  <a href="javascript:;">首页</a>
		  <a href="javascript:;">菜单管理</a>
		  <a><cite >添加菜单</cite></a>
		</span>
		
		<form class="layui-form" id="form_edit" style="margin-top:30px;" >
		  <div class="layui-form-item">
		    <label class="layui-form-label"><span style="color:red;">*</span>上级菜单</label>
		    <div class="layui-input-inline">
		      <input type="hidden"name="pid" id="pid" />
		      <input type="text" lay-verify="fpid"  name="pName" id="pname" placeholder="点击选择" autocomplete="off" class="layui-input" onclick="showMenu(); return false;" readonly="readonly" />
		    </div>
		    <label class="layui-form-label"><span style="color:red;">*</span>模块名称</label>
		    <div class="layui-input-inline">
		      <input type="text"  name="name" lay-verify="fname"  placeholder="请输入模块名称" autocomplete="off" class="layui-input" />
		    </div>
		  </div>
		  <div class="layui-form-item">   
		    <label class="layui-form-label"><span style="color:red;">*</span>模块URL</label>
		    <div class="layui-input-inline">
		      <input type="text" name="url" lay-verify="furl"  placeholder="请输入模块URL" autocomplete="off" class="layui-input" />
		    </div>
		    <label class="layui-form-label">类型</label>
		    <div class="layui-input-inline">
		      <input type="radio" value="0" title="菜单" name="type" checked/>
		      <input type="radio" value="1" title="功能" name="type" />
		    </div>
		  </div>
		  <div class="layui-form-item">
		    <label class="layui-form-label"><span style="color:red;">*</span>排序</label>
		    <div class="layui-input-inline">
		      <input type="text" name="sort" lay-verify="priority"  autocomplete="off" class="layui-input" value="100" oninput="value=value.replace(/[^\d]/g,'')"/>
		    </div>
		    <label class="layui-form-label"><span style="color:red;">*</span>是否启用</label>
		    <div class="layui-input-inline">
		      <input type="radio" value="0" title="否" name="isenable" />
		      <input type="radio" value="1" title="是" name="isenable" checked/>
		    </div>
		  </div>
		  <div class="layui-form-item">      	   
		    <label class="layui-form-label">图标</label>
		    <div class="layui-input-inline" style="width:150px">
		        <a href="javascript:;" onclick="Viewerfun('viewer_icon')">
		           <div id="viewer_icon" >
					   <img data-original="/res/images/up.png" src="/res/images/up.png"  alt="图片"  style="width:40px;height:40px" />
				   </div>
		        </a>
		        <input type="hidden" id="icon" name="icon"  class="layui-input">
		        <input type="file" id="addicon" style="width: 75px; position: absolute; right: 0px;top: 5px;" autocomplete="off" />
		    </div>
		    <label class="layui-form-label">唯一编码</label>
		    <div class="layui-input-inline">
		      <input type="text" name="remarks" lay-verify="fdescription"   placeholder="" autocomplete="off" class="layui-input" />
		    </div>		    
		  </div>
		  <div class="layui-form-item" id="gradientbgColor" >
		     <label class="layui-form-label">背景色</label>
		     <div class="layui-input-inline" style="width:300px">
		        <div id="backgroundColor1"></div>
                <div id="backgroundColor2"></div>
                <span style="color:#8a8080;font-size: 10px">(渐变色二个颜色都需要选择)</span>
		        <input type="hidden" id="backgroundColor" name="backgroundColor"  class="layui-input">
		        <input type="hidden" id="Color1"  value="" class="layui-input">
		        <input type="hidden" id="Color2"  class="layui-input">
		     </div>  
		  </div>
		  <div class="layui-form-item" style="margin-top:30px">
		    <div class="layui-input-block">
		      <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formDemo">提交</button>
			  <button class="layui-btn layui-btn-primary" onclick="historyBack()">返回</button>
		    </div>
		  </div>
		</form>
		</div>
		<div id="menuContent" class="menuContent" style="display:none; position: absolute;">
		  <ul id="treeDemo" class="ztree" style="margin-top:0; width:160px;">
		  </ul>
		</div>
	  <script src="/res/layui/layui.js"></script>  
	  <script src="/res/js/common/jquery-3.2.1.min.js"></script>
	  <script src="/res/js/common/Viewer/viewer.min.js"></script>
	  <script type="text/javascript" src="/res/zTree_v3/js/jquery.ztree.core.js"></script>
	  <script src="/res/js/common/app.js"></script>
	  <script src="/res/js/validate.js"></script>
	  <script src="/res/layui/layui.js"></script>
	  <script src="/res/js/user/permission_form.js"></script>
   </body>
</html>